<template>
	<view class="content u-p-20">
		<view v-if="dataList.length>0">
			<view class="u-flex u-flex-col u-row-left shop-content u-m-t-10" v-for="(item,index) in dataList" :key="index">
				<view class="item-date u-m-b-20">{{ item.createtime }}</view>
				<view class="item-data" v-for="(shopItem,shopIndex) in item.product_list" :key="shopIndex">
					{{shopItem.name}}
				</view>
			</view>
		</view>
		<view v-else class="u-flex u-row-center u-col-center">
			<u-empty text="暂无产品" mode="list"></u-empty>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				dataList:[
				]
			};
		},
		onLoad(){
			this.getData();
		},
		methods:{
			//登录
			async getData(){
				var that = this;
				that.$api('index.index',{token: uni.getStorageSync("token")}).then(res => {
					if (res.code == 1) {
						that.dataList = res.data;
					}
				});
			}
		}
	}
</script>

<style lang="scss">
page{
	background: #F6F6F6;
}
.content{
	background: #F6F6F6;
	.shop-content{
		width: 100%;
		padding: 10rpx 10rpx;
		.item-date{
			width: 100%;
			color: #666666;
		}
		.item-data{
			width: 100%;
			background: #fff;
			padding: 20rpx 20rpx;
			margin-bottom: 20rpx;
			border-radius: 8rpx;
			color: #333333;
		}
	}
	
}
</style>
